package com.beimin.evedata.hsqldb;

import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.pretty.DDLFormatter;

public abstract class HibUtils {

	public static void printConfigurationSchema(Configuration cfg) {
		String[] createSQLs = cfg.generateSchemaCreationScript(new MySQLDialect());
		for (String createSQL : createSQLs) {
			System.out.print(new DDLFormatter(createSQL).format());
			System.out.println(";");
		}
		String newline = System.getProperty("line.separator");
		System.out.println(newline + newline);
	}
}
